Page({
    data:{
        videoSrc:'https://appapi.chnmuseum.cn/uploadfiles/exhibit_t_audio/20220214/202202141426382208.mp3',
        posterSrc: "https://img2.baidu.com/it/u=4046032575,170739907&fm=253&fmt=auto&app=138&f=JPEG?w=479&h=500",
        controls: true,
        autoplay: true,
        loop: true,
        muted: false,
        objectFit: "fill",
        audiotestList:[
            'https://appapi.chnmuseum.cn/uploadfiles/exhibit_t_audio/20220214/202202141426382208.mp3',
            'https://appapi.chnmuseum.cn/uploadfiles/exhibit_t_audio/20220214/202202141451482601.mp3',
            'https://appapi.chnmuseum.cn/uploadfiles/exhibit_t_audio/20220214/202202141436476621.mp3',
        ],
        currentIndex:0,
        currentTime:0
    },
    onShow:function(){
        let videoContext = has.createVideoContext('myVideos');
        // this.data.videoSrc=this.data.audiotestList[currentIndex]
        // this.setData({
        //     videoSrc:this.data.audiotestList[currentIndex]
        // })
       videoContext.play()
    },
    auidoPlay(){

    },
    nextAudio(){
        let videoContext = has.createVideoContext('myVideos');
        videoContext.stop()
        // this.data.currentIndex++
        // this.setData({
        //     videoSrc:this.data.audiotestList[this.data.currentIndex]
        // })
       
        setTimeout(()=>{
            let videoContext1 = has.createVideoContext('myVideos');
            videoContext1.play()
            setInterval(()=>{
                this.setData({
                    currentTime:this.data.currentTime+1000
                })

            },1000)
        },500)
       
    }
})